//properties settings for radio
fmdmeta_prop.control.checkbox = {
		//group for element list - basic/composite/custom/extended
		"group" : "basic",
		//control category
		"controlcategory" : "datacontrol",
		//i18n type name
		"i18ntype" : fmd_i18n_el_checkbox,
		//icon in element list, located in images/designer/modules/
		"icon" : "elem_checkbox.png",
		//html code for dragging
		innerhtml_dragging : '<label class="title">'+fmd_i18n_untitled+'</label>'+
			'<div style="*display:inline;width:10em;padding:0.7em 0.3em 0.7em 0.3em;"><input type="checkbox" value="0"/ >'+
			'<span>'+
			//fmd_i18n_untitled+
			'</span>'+
			'<br/></div>',
		//html code after dropped
		innerhtml_dropped : '<label class="title">'+fmd_i18n_untitled+'</label>'+
			'<div style="*display:inline;width:10em;padding:0.7em 0.3em 0.7em 0.3em;"><input type="checkbox" value="0"/ >'+
			'<span>'+
			//fmd_i18n_untitled+
			'</span>'+
			'<br/></div>',
		"includes-properties" : {
			"common" : fmdmeta_prop.common.all.properties,
			"controlcommon" : fmdmeta_prop.common.datacontrol.properties
		},
		"properties" : {
			"i18ntype" : {
		    	"name" : fmd_i18n_prop_selectiontype,
		    	"img" : "selection.png",
		    	"cellType" : "ro",
		    	"value" : {"default":fmd_i18n_el_checkbox},
		    	"displayOnly" : true,
		    	"afterProperty" : "id"
		    },
		    "databinding" : {
		    	"name" : fmd_i18n_prop_binding,
		    	"img" : "databinding.png",
		    	"cellType" : {
					"type" : "coro",
					"options":"fmdmeta_prop.model_binding_list" //initialized later, so use a reference here, call eval when use
			    },
			    "value" : {"default":""},
		    	"validator" : "NotEmpty"
		    },
		    /*"processbinding" : {
		    	"name" : fmd_i18n_prop_pbinding,
		    	"img" : "processbinding.png",
		    	"cellType" : "processbinding"
		    },*/
		    "validation-value" : {
		    	"name" : fmd_i18n_prop_valuevalidation,
		    	"img" : "validation.png",
			    "cellType" : "ace_validation",
			    "arguments" : {
					"v" : fmd_i18n_modules.checkbox.value
				},
				"params" : {
					"require" : "databinding",
					"inputindex" : 0	//input index for validation in this component, starts from 0
				},
			    "value" : {"default":""}
		    }
		},
		"abandon-properties" : ["valueValidation"],
		"includes-events" : {
			"common" : fmdmeta_prop.common.all.events,
			"controlcommon" : fmdmeta_prop.common.datacontrol.events
		},
		"events" : {
			
		},
		"onApply" : function() {
			var obj = designer.getSelected();
			var vals = fmdc.version.formdata.propconf[obj.attr("id")];
			obj.find('label').html(vals["i18nname-"+fmdmeta_prop.lang])
				.css("display", (vals["hideLabel"]=='1')?"none":"block");
		},
		"propDhxGridEvents" : {
			"onEditCell" : function(stage,rId,cId,nv,ov) {
				return true;
			},
			"onCellChanged" : function(rId,cId,nv) {
				if (nv && cId==fmdmeta_prop.gridconf.idx.value) {
					if (rId=='databinding') {
						var vals = nv.split(".");
						if (vals && vals.length==2) {
							if (fmdc.models[vals[0]] && fmdc.models[vals[0]].attrs[vals[1]]) {
								if (this.doesRowExist("i18nname-zh")) {
									var zh = this.cells("i18nname-zh", cId).getValue();
									if (!zh || zh==fmd_i18n_untitled) this.cells("i18nname-zh", cId).setValue(fmdc.models[vals[0]].attrs[vals[1]].desc_zh);
								}
								if (this.doesRowExist("i18nname-en")) {
									var en = this.cells("i18nname-en", cId).getValue();
									if (!en || en=='Untitled') this.cells("i18nname-en", cId).setValue(fmdc.models[vals[0]].attrs[vals[1]].desc_en);
								}
							} else {
								this.cells(rId,cId).setValue('');
							}
						}
					}
				}
			}
		}
	};